<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>18、表单属性指令-v-model-select元素.html</title>
</head>
<body>

<div id="app">
    <h3>单选选择框</h3>
    <select v-model="blog.categoryId">
        <option value="">--请选择学历--</option>
        <option value="1">小学</option>
        <option value="2">初中</option>
        <option value="3">高中</option>
        <option value="4">本科</option>
        <option value="5">硕士</option>
        <option value="6">博士</option>
    </select>
    <p>你获取的学历是：{{blog.categoryId}}</p>
</div>

<script src="js/vue.global.js"></script>
<script>
    var vm = Vue.createApp({
        created() {
        },
        data() {
            return {
                blog:{
                    categoryId:3
                }
            }
        },
        methods: {}

    }).mount("#app");
</script>

</body>
</html>